<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> 
<head>
	<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="shortcut icon" href="images/favorite.ico" />
	<link rel="stylesheet" href="css/schedule_nav.css" type="text/css" charset="utf-8" />
	<link rel="stylesheet" href="css/note.css" type="text/css" charset="utf-8" />
	<title>日志管理</title>
	<link type="text/css" href="" rel="stylesheet"/>  
	<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="plugin/ckeditor/ckeditor.js"></script>
	<script type="text/javascript">
	 $(function(){ 
		　
		//top navigation  
		var d = 300;
		$('#navigation a').each(function() {
			$(this).stop().animate({
				'marginTop' : '-80px'
			}, d += 150);
		});

		$('#navigation > li').hover(function() {
			$('a', $(this)).stop().animate({
				'marginTop' : '-2px'
			}, 200);
		}, function() {
			$('a', $(this)).stop().animate({
				'marginTop' : '-80px'
			}, 200);
		});
		
		}); 	
	    CKEDITOR.replace('TextArea1');	
	    var pb_strConfirmCloseMessage; 
	    var pb_blnCloseWindow = false; 
	    pb_strConfirmCloseMessage ="您确定要离开吗？"; 
	    function ConfirmClose() { 
	        window.event.returnValue = pb_strConfirmCloseMessage; 
	        pb_blnCloseWindow = true; 
	    } 
	    function ShowConfirmClose(blnValue) { 
	        if(blnValue) { 
	            document.body.onbeforeunload = ConfirmClose; 
	        } else { 
	            document.body.onbeforeunload = null; 
	        } 
	    }
	</script>
	<style type="text/css">
		
	</style>
</head>
<body  onload="ShowConfirmClose(true);">
	<div id="topnav">
		<ul id="navigation">
			<li class="home"><a href="main_page.action"><span>主页</span></a></li>
			<li class="about"><a href="schedule/schedule_page.action"><span>日程秘书</span></a></li>
			<li class="search"><a href=""><span>文档管理</span></a></li>
			<li class="photos"><a href=""><span>个人相册</span></a></li>
			<li class="rssfeed"><a href=""><span>阅读器</span></a></li>
			<li class="podcasts"><a href=""><span>账目理财</span></a></li>
			<li class="contact"><a href=""><span>联系管理员</span></a></li>
		</ul>
	</div>
	<div id="top">
		<div id="overlay-bg">
			<div id="pagewrap">
				<div id="title"> 
					<h1 id="site-logo"><a href="note/note_page.action">日常笔记</a></h1> 
					<h2 id="site-description">不管是记录日常生活的点点滴滴，还是收藏一些好的网文，都是不错的选择</h2>	
				</div> 
				<div id="header">
					<nav>
						<ul class="social" id="css3">
							<li class="enote">
								<a href="note/editNote_page.action"><strong>添加文章</strong></a>
							</li>
							<li class="edir">
								<a href="note/editDir_page.action"><strong>编辑目录</strong></a>
							</li>
						</ul>
					</nav>
					<nav>
						<ul id="main-nav" class="clearfix">			
							<s:iterator value="session.dirs" id="c" status="st">
								<li>
									<a href="note/selectDir_do.action?dirIndex=<s:property value="#st.index"/>">
										<s:property value="#c.dirName"/>								
										<span>(<s:property value="#c.nCount"/>)</span>
									</a>
								</li>
							</s:iterator>
						</ul>
					</nav>
					<form method="get" id="searchform" action="http://webdesignerwall.com/">
						<input type="text" name="s" id="s" placeholder="Search" class="placeholder">
					</form>
				</div>
				<div id="body">
					<div id="content">									
						<form action="note/saveNote_do.action" method="post">
				   
				        	<div><label>标题：</label><input name="note.title" ></div>
				        	<textarea name="note.content" id="TextArea1" cols="20" rows="5" class="ckeditor">
				        		
				        	</textarea>
				            <div>
				            <label>所属类别：</label>
				            <select id="sel" name="dirIndex">
				              <s:iterator value="session.dirs" id="c" status="st">
				              	<option value ="<s:property value="#st.index"/>"><s:property value="#c.dirName" /></option>
				              </s:iterator>		  
							</select> 
				            </div>
				            <div>      
				            <label>标签：(请用","分隔标签,如："C++,java")</label><input name="note.label" />
				             </div>
				             <div>
				            <label sytle="float:left">文章摘要：</label>
				            <textarea name="note.summary" cols="60" rows="10">
				   
				        	</textarea>	
				        	</div>			        
				            <input type="submit" value="提交文章"/>		         
					</div>
					<!--/content -->
				</div>
			</div>
		</div>
	</div>
</body>

</html>